From 93c086ec80494c5edf84fd6e21c34aec196ea359 Mon Sep 17 00:00:00 2001 From: Alexander Larsson Date: Mon, 5 Dec 2011 12:51:55 +0100 Subject: [PATCH] Make window handle transparent Instead of painting the window background on the grip_window we now only paint it on the GtkWindow->window, and we make the grip_window have a transparent background. We can't really make transparent window handle background optional via css atm, because the handle color is actually based on the background color, so if that is set to transparent we won't draw anything. --- gtk/gtkwindow.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/gtk/gtkwindow.c b/gtk/gtkwindow.c index 50370a589a..fd23dd9a71 100644 --- a/gtk/gtkwindow.c +++ b/gtk/gtkwindow.c @@ -5521,6 +5521,7 @@ resize_grip_create_window (GtkWindow *window) GdkWindowAttr attributes; gint attributes_mask; GdkRectangle rect; + GdkRGBA transparent = {0, 0, 0, 0}; priv = window->priv; widget = GTK_WIDGET (window); @@ -5545,6 +5546,7 @@ resize_grip_create_window (GtkWindow *window) priv->grip_window = gdk_window_new (gtk_widget_get_window (widget), &attributes, attributes_mask); + gdk_window_set_background_rgba (priv->grip_window, &transparent); gdk_window_set_user_data (priv->grip_window, widget); @@ -7440,7 +7442,8 @@ gtk_window_draw (GtkWidget *widget, gtk_style_context_save (context); - if (!gtk_widget_get_app_paintable (widget)) + if (!gtk_widget_get_app_paintable (widget) && + gtk_cairo_should_draw_window (cr, gtk_widget_get_window (widget))) { GtkStateFlags state; -- 2.30.2